package com.intelligence.openfeign.service.deivce;

import com.intelligence.entity.pojo.DeviceLog;
import com.intelligence.entity.pojo.DeviceThreshold;
import com.intelligence.entity.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * deviceLog的openFeign调用接口
 *
 * @Author : RulerWood
 * @Data : 2024/6/3 - 15:37
 */
@FeignClient(value = "system-device",contextId = "deviceThreshold", path = "/device/deviceThreshold")
public interface DeviceThresholdFeignService {

    @GetMapping("/listDeviceThreshold")
    Result<List<DeviceThreshold>> listDeviceThreshold();

    @GetMapping("/getDeviceThreshold/{id}")
    Result<DeviceThreshold> getDeviceThreshold(@PathVariable(value = "id") Long id);

    /**
     * 数据的新增
     *
     * @param deviceThreshold 保存对象
     * @return
     */
    @PostMapping("/saveDeviceThreshold")
    Result saveDeviceThreshold(@RequestBody DeviceThreshold deviceThreshold);

    /**
     * 数据的修改
     *
     * @param deviceThreshold 修改对象
     * @return
     */
    @PutMapping("/updateDeviceThreshold")
    Result updateDeviceThreshold(@RequestBody DeviceThreshold deviceThreshold);

    /**
     * 删除某条数据
     *
     * @param id 数据主键
     * @return
     */
    @DeleteMapping("/deleteDeviceThreshold/{id}")
    Result deleteDeviceThreshold(@PathVariable(value = "id") Integer id);

}
